<?php

namespace app\common\validate;

class GoodsValidate extends BaseValidate
{
    /**
     * 验证规则
     */
    protected $field = [
        'goods_id'      => '',
        'goods_name'    => '商品名称',
        'goods_cate_id' => '商品分类ID',
        'store_qty'     => '总库存数',
        'comment_sum'   => '评价数',
        'sales_sum'     => '销量',
        'page_views'    => '浏览量',
        'shop_price'    => '门店售价',
        'goods_images'  => '商品图片',
        'goods_image'   => '商品主题',
        'goods_desc'    => '商品详情',
        'create_time'   => '创建时间',
        'update_time'   => '更新时间',

    ];

    /**
     * 验证场景
     */
    protected $scene = [
        'index'  => [],
        'save'   => [
            'goods_name'    => 'require',
            'goods_cate_id' => 'require',
            'goods_images'  => 'require|array',
            'goods_desc'    => 'require',
            'goods_sku'   => 'require|array',
            'delivery_fee' =>'require'
        ],
        'update' => [

        ],
        'delete' => [],
        'read'   => []
    ];

    /**
     * 提示消息
     */
    protected $message = [

    ];


}
